from datetime import datetime
from django.db import models
class stu_register(models.Model):
    sno = models.CharField(max_length=255)
    rn = models.CharField(max_length=255,default=0)
    pno = models.CharField(max_length=255, default=0,unique=True)
    birthday = models.DateField(default=datetime.strptime('1970-1-1', '%Y-%m-%d'), blank=True, null=True)
    pwd = models.CharField(max_length=255, default=0)

class sale_register(models.Model):
    saleno = models.CharField(max_length=255)
    sname = models.CharField(max_length=255, default=0)
    spno = models.CharField(max_length=255, default=0,unique=True)
    account = models.CharField(max_length=255, default=0)
    pwd = models.CharField(max_length=255, default=0)

class product_info(models.Model):
    product_no=models.CharField(max_length=255)
    product_name=models.CharField(max_length=255)
    product_pic=models.ImageField(upload_to='pic')
# Create your models here.